﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using PPI.Entities;
using PPI.Entities.Interface;
using VMind.Global;


namespace PPI.Client.Logic
{
    public class LVendor_Visit_Type
    {
        public static List<EVendor_Visit_Type> SelectAllIdName()
        {
            List<EVendor_Visit_Type> _returnList = new List<EVendor_Visit_Type>();
            DataTable dt = WebConsumer.WVendor_Visit_Type.SelectAllIdName().Tables[0];
            foreach (DataRow dr in dt.Rows)
            {
                EVendor_Visit_Type vt = new EVendor_Visit_Type();
                vt.Vendor_Visit_TypeId = ConvertHelper.ToInt32(dr["Vendor_Visit_TypeID"]);
                vt.Name = dr["Name"].ToString();
                vt.Tops = LXMissionStructures_TopType.SelectAllIdNameByType(vt.Vendor_Visit_TypeId);
                _returnList.Add(vt);
            }
            return _returnList;
        }

    }
}
